name: Formatting Check

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  checks:
    name: Check nix formatting
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: cachix/install-nix-action@v20
        with:
          extra_nix_config: |
            auto-optimise-store = true
            experimental-features = nix-command flakes
      - run: nix run nixpkgs#alejandra -- -c .
